package com.gewu.pm.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 下属打卡记录分组数据模型（外层）
 */
public class AttendanceRecordGroupBean implements Parcelable {

    private String id;
    private String date; // 日期，如：2025-01-01
    private List<AttendanceRecordChildBean> childList; // 该日期下的打卡记录列表

    public AttendanceRecordGroupBean() {
    }

    protected AttendanceRecordGroupBean(Parcel in) {
        id = in.readString();
        date = in.readString();
        childList = in.createTypedArrayList(AttendanceRecordChildBean.CREATOR);
    }

    public static final Creator<AttendanceRecordGroupBean> CREATOR = new Creator<AttendanceRecordGroupBean>() {
        @Override
        public AttendanceRecordGroupBean createFromParcel(Parcel in) {
            return new AttendanceRecordGroupBean(in);
        }

        @Override
        public AttendanceRecordGroupBean[] newArray(int size) {
            return new AttendanceRecordGroupBean[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(date);
        dest.writeTypedList(childList);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public List<AttendanceRecordChildBean> getChildList() {
        return childList;
    }

    public void setChildList(List<AttendanceRecordChildBean> childList) {
        this.childList = childList;
    }
}
